<script lang="ts" setup>
const props = defineProps({
  title: {
    type: String,
    required: true
  }
})
const emit = defineEmits(['close'])
const handClose = () => {
  emit('close', false)
}
</script>
<template>
  <div class="pop">
    <div class="header">
      <strong
        ><span>{{ title }}</span></strong
      >
      <!-- <div class="title">
                    <slot name="title"></slot>
                </div> -->
      <button class="close" @click="handClose">
        <el-icon><Close /></el-icon>
      </button>
    </div>
    <slot></slot>
  </div>
</template>

<style lang="scss" scoped>
.pop {
  width: 300px;
  background-color: #fff;
  padding: 10px;
  border-radius: 5px;
  box-sizing: border-box;
  position: absolute;
  z-index: 402;
  display: flex;
  flex-direction: column;
  .header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
  }
}
</style>
